perm filename PROB6.PUB[LSP,JRA]14 blob
sn#305707 filedate 1977-09-14 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00002 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002
C00007 ENDMK
C⊗;
.NEXT PAGE;
.SS(The Great Mothers,,P39:)
.FP
The following problems are written (intentionally) with a great deal
of the representation built into them.
.BEGIN CENTERIT;TABs 1,16,30,44;turn on "\";
.GROUP;
←%21. The Great Mother of All Functions (⊗→%3tgmoaf%*↔←)
%3
\tgmoaf[x] <= \[isindiv[x] →\[eq[x;T] → %et%*;
\\\ eq[x;NIL] → %ef%*;
\\\ %et%* → TRYAGAINNEXTWEEK];
\\ eq[first[x];QUOTE] → second[x];
\\ eq[first[x];CAR] → car[tgmoaf[second[x]]];
\\ eq[first[x];CDR] → cdr[tgmoaf[second[x]]];
\\ eq[first[x];CONS] → cons[\tgmoaf[second[x]];
\\\\tgmoaf[third[x]]];
\\ eq[first[x];ATOM] → atom[tgmoaf[second[x]]];
\\ eq[first[x];EQ] → eq[tgmoaf[second[x]];tgmoaf[third[x]]];
\\ %et%* → TRYAGAINNEXTWEEK]
%1
.END;
.BEGIN CENTERIT;TABs 1,16,30,44;turn on "\";
.GROUP
Evaluate the following:
%2a.%3 tgmoaf[T]
%2b.%3 tgmoaf[A]
%2c.%3 tgmoaf[(CAR (QUOTE (A . B)))]
%2d.%3 tgmoaf[(CDR (QUOTE (A B)))]
%2e.%3 tgmoaf[(EQ (CAR (QUOTE (A . B))) (QUOTE A))]
%2f.%3 tgmoaf[(EQ (CAR (QUOTE (A . B))) A)]
%2g.%3 tgmoaf[(ATOM (CAR (QUOTE (A B))))]
.APART
.GROUP
←%22. The Great Mother of All Functions Revisited (⊗→%3tgmoafr%*↔←)
%3
\tgmoafr[x] <= \[isindiv[x] →\[eq[x;T] → %et%*;
\\\ eq[x;NIL] → %ef%*;
\\\ %et%* → TRYAGAINNEXTWEEK];
\\ eq[first[x];QUOTE] → second[x];
\\ eq[first[x];CAR] → car[tgmoafr[second[x]]];
\\ eq[first[x];CDR] → cdr[tgmoafr[second[x]]];
\\ eq[first[x];CONS] → cons[\tgmoafr[second[x]];
\\\\tgmoafr[third[x]]];
\\ eq[first[x];ATOM] → atom[tgmoafr[second[x]]];
\\ eq[first[x];EQ] → eq[tgmoafr[second[x]];tgmoafr[third[x]]];
\\ eq[first[x];COND] → evcond[rest[x]];
\\ %et%* → TRYAGAINNEXTWEEK]
.APART
.GROUP
\evcond[x] <=\[tgmoafr[first[first[x]]] → tgmoafr[second[first[x]]];
\\ %et%* → evcond[rest[x]] ]
.APART
.GROUP
%1
Evaluate the following:
.BEGIN TABIT2(22,23);
%2a.%3 tgmoafr[T]
%2b.%3 tgmoafr[(CDR (QUOTE (A B)))]
%2c.%3 tgmoafr[(EQ (CAR (QUOTE (A . B))) (QUOTE A))]
%2d.%3 tgmoafr[(COND (\(EQ (CAR (QUOTE (A . B))) (QUOTE A))
\\(QUOTE FOO)))]
%25.%3 tgmoafr[(COND\((ATOM (QUOTE (A))) (QUOTE FOO))
\(T (QUOTE BAZ)))]
.END
.APART
←Coming soon: %2Son of Great Mother !!%*
.END